<script lang="ts">
    import { type NodeProps } from "@xyflow/svelte";
    import NodeWrap from "../common/NodeWrap.svelte";
    import type { ExDrawNodeInfo } from "$lib/api/board/board_draw";
    const props: NodeProps = $props();
  
    const nodeInfo = $derived(props.data as ExDrawNodeInfo);
  </script>
  
  <NodeWrap nodeProps={props} showBorder={false} showBgColor={false} showResizer>
    <div
      class={`${nodeInfo.node_style.border_width == "border-0" ? "border-2" : nodeInfo.node_style.border_width} ${nodeInfo.node_style.border_color} ${nodeInfo.node_style.bg_color} w-full h-full  flex items-center justify-center`}
    >
    <div
    class={`${nodeInfo.content.BasicRectangleContent?.font_size ?? ""} ${nodeInfo.content.BasicRectangleContent?.font_weight ?? ""}`}
  >
    {nodeInfo.content.BasicRectangleContent?.text ?? ""}
  </div>
    </div>
  </NodeWrap>
  